package com.cskaoyan.mapper;

import com.cskaoyan.bean.po.AdminLogPO;
import com.cskaoyan.bean.po.AdminPO;
import com.cskaoyan.bean.po.MarketLogPO;
import com.cskaoyan.bean.po.RolePO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AdminMapper {
    List<AdminPO> selectAdminByName(@Param("sort") String sort, @Param("order") String order, @Param("username") String username);

    List<RolePO> selectAllRoles();

    int insertAdmin(@Param("adminPO") AdminPO adminPO);

    int updateAdminById(@Param("adminPO") AdminPO adminPO);

    int logicalDeleteAdmin(@Param("id") Integer id);

    List<MarketLogPO> selectAllLog(@Param("sort") String sort, @Param("order") String order, @Param("name") String name);

    List<AdminPO> selectAdminByAdminName(@Param("username") String username);

    void insertAdminLog(@Param("adminLogPO") AdminLogPO adminLogPO);

}
